package com.levi.StrategyPattern;

/**
 * @author Levi
 * @description :  策略选择类
 * @since 2022/8/31 15:35
 */

public class CashContext {
    private CashSuper cashSuper;

    //    构造函数
    public CashContext(CashSuper cashSuper) {
        this.cashSuper = cashSuper;
    }

    //    获取结算价格
    public double getResult(double money) {
        return cashSuper.acceptCash(money);
    }
}
